package com.wantupai.mvp.framework.support.viewstate;

import android.support.annotation.NonNull;

import com.wantupai.mvp.framework.support.MvpDelegateCallback;
import com.wantupai.mvp.mvp.MvpPresenter;
import com.wantupai.mvp.mvp.MvpView;


/**
 * 目标接口
 *
 * @param <V>
 * @param <P>
 */
public interface MvpViewStateDelegateCallback<V extends MvpView, P extends MvpPresenter<V>, VS extends ViewState<V>>
        extends MvpDelegateCallback<V, P> {

    VS getViewState();

    void setViewState(VS viewState);

    @NonNull
    VS createViewState();

    void setRestoringViewState(boolean restoringViewState);

    boolean isRestoringViewState();

    void onViewStateInstanceRestored(boolean instanceStateRetained);

    void onNewViewStateInstance();
}
